import request from "@/utils/request";
export const loginAPI = (data) => {
  return request({
    url: "/user/login",
    method: "post",
    data,
  });
};
export const registerAPI = (data) => {
  return request({
    url: "/user/register",
    method: "post",
    data,
  });
};
export const getChatListAPI = (pageNum) => {
  return request({
    url: "/user/chat/list",
    method: "get",
    params: { pageNum },
  });
};
export const getUserByCode = (code) => {
  return request({
    url: "/user/code/" + code,
    method: "get",
  });
};
export const logoutAPI = () => {
  return request({
    url: "/user/logout",
    method: "get",
  });
};
